package Comp355Final.main;

import android.graphics.Color;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.TextView;

public class PanelOnTouchListener implements OnTouchListener{
	TextView tmptxt_view;
	public PanelOnTouchListener(TextView tmptxt_view)
	{
		this.tmptxt_view=tmptxt_view;
	}
	public boolean onTouch(View v, MotionEvent event) {
		
		//Utility.quick_dialog(String.valueOf(event), v.getContext());
		if(event.getAction()==MotionEvent.ACTION_DOWN)
			tmptxt_view.setTextColor(Color.RED);
		if(event.getAction()==MotionEvent.ACTION_UP)
			tmptxt_view.setTextColor(Color.BLACK);
		if(event.getAction()==MotionEvent.ACTION_CANCEL)
			tmptxt_view.setTextColor(Color.BLACK);
		return false;
	}

}
